package com.example.mybatisdemo.controller;

import com.example.mybatisdemo.enitity.User;
import com.example.mybatisdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName UserController
 * @Author 刘泽
 * @Mail liuze713@hotmail.com
 * @Date 2021/12/22 5:32 PM
 * @Version 1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

  @Autowired
  private UserService userService;

  @RequestMapping("/findAll")
  public List<User> findAll() {
    return userService.findAll();
  }

}
